{% extends "package/base.html" %}

{% load crispy_forms_tags i18n page_metadata_tags %}

{% block metadata %}
    {% translate "Delete package example" as trans_title %}
    {% page_metadata page_title=trans_title %}
{% endblock metadata %}

{% block body %}

    <h2>{% translate "Delete package example" %}</h2>

    <p>{% translate "Ready to delete" %} <b>{{ package_example.title }}</b></p>
    <a href="{% url 'package' package_example.package.slug %}">{% translate "cancel" %}</a>
    {% if user.id == package_example.created_by.id %}
        <form action="{% url 'confirm_delete_example' package_example.package.slug package_example.id %}" method="post" id="example-delete">
            {% csrf_token %}
            <input type="submit" class="btn btn-danger" name="delete" value="{% translate "Delete" %}">
        </form>
    {% endif %}

{% endblock body %}

{% block extra_body %}
    <script>
        $("#id_title").focus();
    </script>
{% endblock extra_body %}
